package com.ag.work.service.impl;

import java.util.List;

import javax.annotation.Resource;

import com.ag.bean.TbProposeRecord;
import com.ag.common.IDUtil;
import com.ag.common.IIDService;
import com.ag.work.dao.ProposeRecordDAO;
import com.ag.work.service.IProposeRecordService;

public class ProposeRecordServiceImpl implements IProposeRecordService {

	@Resource(name = "iDServiceImpl")
	private IIDService idServiceImpl;
	private ProposeRecordDAO proposeRecordDAO;
	
	@Override
	public boolean save(TbProposeRecord proposeRecord) {
		//TbProposeRecordId proposeRecordId = new TbProposeRecordId();
		//proposeRecordId.setPpId(idServiceImpl.findTablePK(IDUtil.TB_PROPOSE));
		
		proposeRecord.setNewPpId(idServiceImpl.findTablePK(IDUtil.TB_PROPOSE_RECORD));
		//proposeRecord.setH("1");
		this.proposeRecordDAO.save(proposeRecord);
		return false;
	}
	
	@Override
	public List findRecord(String UId) {
		return this.proposeRecordDAO.findRecord(UId);
	}

	public IIDService getIdServiceImpl() {
		return idServiceImpl;
	}

	public void setIdServiceImpl(IIDService idServiceImpl) {
		this.idServiceImpl = idServiceImpl;
	}

	public ProposeRecordDAO getProposeRecordDAO() {
		return proposeRecordDAO;
	}

	public void setProposeRecordDAO(ProposeRecordDAO proposeRecordDAO) {
		this.proposeRecordDAO = proposeRecordDAO;
	}
	
}
